﻿<%@ Page Title="" Language="C#" MasterPageFile="~/hgmanage/Main.Master" AutoEventWireup="true"
    CodeBehind="PowerGroup_ESon.aspx.cs" Inherits="huaguwang.hgmanage.Power.PowerGroup_ESon" %>

  <%@ Register assembly="HGWebControls" namespace="huaguwang.WebControls" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script>
        function CheckSon(o) {
            var oValue = o.id;
            var ch = o.checked;
            $("input[name='" + oValue + "_C']").attr("checked", ch);
        }
        function CheckSon1(o) {
            var oValue = o.id;
            var ch = o.checked;

            $("input[sid='" + oValue + "']").click();
            $("input[sid='" + oValue + "']").attr("checked", ch);
        }
        function GetCheck() {
            var s = "";
            $("input[sid='Son']").each(function(i,o) {
                
                if (o.checked) {
                    s = s + o.value + ",";
                }
            });
            // alert(s);
            $("#Hidden1").attr("value",s);
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Body" runat="server">
    <input id="Hidden1" name="Hidden1" type="hidden" value="" />
    <cc1:WebUserToolBar ID="WebUserToolBar1" runat="server" OnButton0="WebUserToolBar1_Button0"
        OnButton1="WebUserToolBar1_Button1" OnLoadErr="WebUserToolBar1_LoadErr" CssClass="toolbar"
        ButtonCSS="btn_done">
    </cc1:WebUserToolBar>
    <div class="info_done_box">
        <asp:Repeater ID="Repeater1" runat="server" OnDataBinding="Repeater1_DataBinding"
            OnItemDataBound="Repeater1_ItemDataBound">
            <ItemTemplate>
                <div class="DIV_1" style="text-align: left">
                    主菜单:<%#Eval("MenuName")%><input type="checkbox" id="M_<%#Eval("id") %>" name="M_<%#Eval("id") %>"
                        onclick="javascript:CheckSon1(this);" />
                    <asp:Repeater ID="Repeater2" runat="server" OnItemDataBound="Repeater2_ItemDataBound1">
                        <ItemTemplate>
                            <div class="DIV_2">
                                表单:<%#Eval("MenuName")%><input type="checkbox" id="M_<%#Eval("id") %>" sid="M_<%#Eval("MenuParentID") %>"
                                    name="M_<%#Eval("id") %>" onclick="javascript:CheckSon(this);" /><asp:Repeater ID="Repeater3"
                                        runat="server">
                                        <ItemTemplate>
                                            <%#Eval("ButtonName")%>:
                                            <input type="checkbox" id="M_<%#Eval("MenuID") %>_<%#Eval("id") %>" name="M_<%#Eval("MenuID") %>_C"
                                                value="<%#Eval("id") %>" <%# ((bool)Eval("IsLeft"))?"checked=\"checked\"":"" %>
                                                sid="Son" />
                                        </ItemTemplate>
                                    </asp:Repeater>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
            </ItemTemplate>
        </asp:Repeater>
    </div>
</asp:Content>
